<?php

/****************************************************************************************\
 **   @name		EXP Templates 1.0                                               **
 **   @package          Joomla 1.6/1.7/2.5                                              **
 **   @author		EXP TEAM::Alexey Kurguz (Grusha)                                **
 **   @copyright	Copyright (C) 2005 - 2012  EXP TEAM::Alexey Kurguz (Grusha)     **
 **   @link             http://www.feellove.eu                                          **
 **   @license		Commercial License                                              **
 \****************************************************************************************/
// No direct access.
defined('_JEXEC') or die;

$params = JFactory::getApplication()->getTemplate(true)->params;
$logo = $params->get('logo');
$footerlogo = $params->get('footerlogo');
$logolink = $params->get('logolink');
$sitetitle = $params->get('sitetitle');


if ($params->get('bootstrap')) {
    $bootstrap = $params->get('bootstrap');
} else {
    $bootstrap = 'bootstrap.css';
}
if ($params->get('expbootstrap')) {
    $expbootstrap = $params->get('expbootstrap');
} else {
    $expbootstrap = 'expbootstrap.css';
}
$mitemid = JRequest::getInt('Itemid');

//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />

        <meta name="language" content="<?php echo $this->language; ?>" />

        <title><?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?></title>
        <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/bootstrap/<?php echo $bootstrap; ?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/bootstrap-responsive.css" rel="stylesheet" />
        <style type="text/css">
            body {
                padding-top: 60px;
                padding-bottom: 0px;
            }
        </style>
        <?php if ($this->error->getCode() >= 400 && $this->error->getCode() < 500) { ?>
            <?php jimport('joomla.application.module.helper'); ?>
        </head>
        <body>
            <div class="navbar navbar-fixed-top navbar-inverse">
                <div class="navbar-inner">
                    <div class="container">
                        <a class="brand" href="<?php echo $this->baseurl ?>">
                            <?php if ($logo): ?>
                                <img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                            <?php else: ?>
                                <?php echo htmlspecialchars($sitetitle); ?>
                            <?php endif; ?>
                        </a>
                    </div>
                </div>
            </div>
            <div id="exptemplates" class="container">
                <div class="row">
                    <div class="span3">
                        <div class="well">
                            <?php
                            $module = JModuleHelper::getModule('menu');
                            echo JModuleHelper::renderModule($module);
                            ?>
                        </div>
                    </div>
                    <div class="span9">
                        <div class="alert alert-error">
                            <h3><?php echo JText::_('JERROR_AN_ERROR_HAS_OCCURRED'); ?><br />
                                <?php echo JText::_('JERROR_LAYOUT_PAGE_NOT_FOUND'); ?></h3>
                        </div>
                        <?php if (JModuleHelper::getModule('search')) : ?>
                            <form class="well" action="<?php echo JRoute::_('index.php'); ?>" method="post">
                                <label><?php echo JText::_('JERROR_LAYOUT_SEARCH'); ?></label>
                                <input name="searchword" id="mod-search-searchword"  class="span3" type="text" placeholder="<?php echo JText::_('TPL_EXPTEMPLATE_SEARCH'); ?>" />
                                <br />
                                <button type="submit" class="btn"><?php echo JText::_('TPL_EXPTEMPLATE_SEARCH'); ?></button>
                                <input type="hidden" name="task" value="search" />
                                <input type="hidden" name="option" value="com_search" />
                                <input type="hidden" name="Itemid" value="<?php echo $mitemid; ?>" />
                            </form>
                        <?php endif; ?>
                        <a class="btn btn-success" href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_HOME_PAGE'); ?></a>
                        <br /><br />
                        <div class="alert alert-info">
                            <h3><?php echo JText::_('JERROR_LAYOUT_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR'); ?></h3>
                            <div class="alert alert-error">
                                <h3>#<?php echo $this->error->getCode(); ?>&nbsp;<?php echo $this->error->getMessage(); ?></h3> <br />
                                <?php
                                if ($this->debug) :
                                    echo $this->renderBacktrace();
                                endif;
                                ?>
                            </div>
                        </div>
                    </div>
                </div>
                <footer class="exptemplates_footer">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <div class="container">
                                <a class="brand" href="<?php echo $logolink ?>">
                                    <?php if ($footerlogo): ?>
                                        <img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($footerlogo); ?>"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                                    <?php else: ?>
                                        <img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/images/logo_exp.png"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                                    <?php endif; ?>
                                </a>
                                <div class="nav pull-right">
                                    <a class="brand" href="<?php echo $this->baseurl ?>">
                                        <p>
                                            <?php echo htmlspecialchars($sitetitle); ?> &copy; Company 2012
                                        </p>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </footer>
            </div>
        </body>
    </html>
<?php } else { ?>
    <?php
    if (!isset($this->error)) {
        $this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
        $this->debug = false;
    }
    ?>

    </head>
    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <a class="brand" href="<?php echo $this->baseurl ?>">
                        <?php if ($logo): ?>
                            <img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                        <?php else: ?>
                            <?php echo htmlspecialchars($sitetitle); ?>
                        <?php endif; ?>
                    </a>
                </div>
            </div>
        </div>
        <div id="exptemplates" class="container">
            <div class="row">
                <div class="span12">
                    <div class="alert alert-error">
                        <h4 class="alert-heading" style="text-align:center;"><?php echo $this->title; ?></h4>
                        <div class="well">
                            <p><strong><?php echo JText::_('JERROR_LAYOUT_NOT_ABLE_TO_VISIT'); ?></strong></p>
                            <ol>
                                <li><?php echo JText::_('JERROR_LAYOUT_AN_OUT_OF_DATE_BOOKMARK_FAVOURITE'); ?></li>
                                <li><?php echo JText::_('JERROR_LAYOUT_SEARCH_ENGINE_OUT_OF_DATE_LISTING'); ?></li>
                                <li><?php echo JText::_('JERROR_LAYOUT_MIS_TYPED_ADDRESS'); ?></li>
                                <li><?php echo JText::_('JERROR_LAYOUT_YOU_HAVE_NO_ACCESS_TO_THIS_PAGE'); ?></li>
                                <li><?php echo JText::_('JERROR_LAYOUT_REQUESTED_RESOURCE_WAS_NOT_FOUND'); ?></li>
                                <li><?php echo JText::_('JERROR_LAYOUT_ERROR_HAS_OCCURRED_WHILE_PROCESSING_YOUR_REQUEST'); ?></li>
                            </ol>
                        </div>
                        <p><strong><?php echo JText::_('JERROR_LAYOUT_PLEASE_TRY_ONE_OF_THE_FOLLOWING_PAGES'); ?></strong></p>

                        <ul>
                            <li><a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_HOME_PAGE'); ?></a></li>
                            <li><a href="<?php echo $this->baseurl; ?>/index.php?option=com_search" title="<?php echo JText::_('JERROR_LAYOUT_SEARCH_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_SEARCH_PAGE'); ?></a></li>

                        </ul>

                        <p><?php echo JText::_('JERROR_LAYOUT_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR'); ?>.</p>
                        <div class="alert alert-info">
                            <p><?php echo $this->error->getMessage(); ?></p>
                            <p>
                                <?php
                                if ($this->debug) :
                                    echo $this->renderBacktrace();
                                endif;
                                ?>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <footer class="exptemplates_footer">
                <div class="navbar navbar-inverse">
                    <div class="navbar-inner">
                        <div class="container">
                            <a class="brand" href="<?php echo $logolink ?>">
                                <?php if ($footerlogo): ?>
                                    <img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($footerlogo); ?>"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                                <?php else: ?>
                                    <img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/images/logo_exp.png"  alt="<?php echo htmlspecialchars($sitetitle); ?>" />
                                <?php endif; ?>
                            </a>
                            <div class="nav pull-right">
                                <a id="footer_copy" class="brand expsize14" href="<?php echo $this->baseurl ?>">
                                    <p>
                                        <?php echo htmlspecialchars($sitetitle); ?> &copy; Company 2012
                                    </p>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
    </body>
    </html>


<?php } ?>
